Versions:

  • 0.12.3

tdoc is a command-line tool by Rob Lillack for reading, rendering and converting text documents. Delivered as a single binary, it handles Markdown, HTML, Gemini (gemtext) and FTML documents. The input can be a file, a URL or standard input, and tdoc either renders the content as richly styled terminal output with a built-in pager or converts it from one supported format into another. Internally, every supported format is parsed into a single in-memory document tree, which means that anything the program can read can also be rendered and written out again in any other format it knows. This design makes tdoc usable both as a terminal document viewer and as a format converter, for example to read a Markdown README comfortably in a console, to turn an HTML page into Markdown or gemtext, or to produce HTML from FTML sources. A watch mode re-renders the view or regenerates the output file whenever the input file changes, which is useful while writing a document and checking the result alongside. The tool fits the categories of command-line utilities, document converters and pagers, and it addresses developers, writers and users of the Gemini protocol who prefer working in a terminal. The source code is hosted on GitHub. The current release is version 0.12.3.

Tags: